function init(){
  var maxExtent = new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508),
    restrictedExtent = maxExtent.clone(),
    maxResolution = 156543.0339;
  
  var options = {
      units: "m",
      numZoomLevels: 18,
      minZoomLevel: 1,
      maxResolution: maxResolution,
      maxExtent: maxExtent,
      restrictedExtent: restrictedExtent
  };

  map = new OpenLayers.Map( 'map', options);
	wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
	google = new OpenLayers.Layer.Google( "Google Hybrid" , {type: G_HYBRID_MAP, sphericalMercator: true});
   
	map.addControl(new OpenLayers.Control.LayerSwitcher());
	map.addControl(new OpenLayers.Control.MousePosition());
	map.addLayers([google]);
  map.zoomToMaxExtent();

  // test
  OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {                
                defaultHandlerOptions: {
                    'single': true,
                    'double': false,
                    'pixelTolerance': 0,
                    'stopSingle': false,
                    'stopDouble': false
                },

                initialize: function(options) {
                    this.handlerOptions = OpenLayers.Util.extend(
                        {}, this.defaultHandlerOptions
                    );
                    OpenLayers.Control.prototype.initialize.apply(
                        this, arguments
                    ); 
                    this.handler = new OpenLayers.Handler.Click(
                        this, {
                            'click': this.trigger
                        }, this.handlerOptions
                    );
                }, 

                trigger: function(e) {
                    var lonlat = map.getLonLatFromViewPortPx(e.xy);
                    var text = lonlat.lon + ", " + lonlat.lat;
                    alert(text);
                    point = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);
                    feature = new OpenLayers.Feature.Vector(point);
                    layers = this.map.getLayersByName("Simple Geometry");
                    for(var i = 0; i < layers.length; i++){
                      layers[i].addFeatures([feature]);
                    }
                    console.log(text);
                }

            });
  var click = new OpenLayers.Control.Click();
  map.addControl(click);
  click.activate();
  
  var vectorLayer = new OpenLayers.Layer.Vector("Simple Geometry");
  var airplaneVectorLayer = new OpenLayers.Layer.Vector(
      "Airplane Geometry",
      {
          styleMap: new OpenLayers.StyleMap({
              "default": {
                  externalGraphic: "images/plane.png",
                  graphicWidth: 48,
                  graphicHeight: 48,
                  graphicXOffset: -24,
                  graphicYOffset: -24,
                  rotation: "${angle}"
              }
          })
      }
  );

  map.addLayers([vectorLayer, airplaneVectorLayer]);
  return map;
}


